
public class Test {

    public static void main(String[] args) {
	int[] array = new int[]{1,0,5,7,3,9,7,4,2,6};
	printArray(array);
	printArray(dubbleSort(array));
    }

    private static int[] dubbleSort(int[] array) {
	for (int i = 0; i < array.length; i++) {
	    for (int j = i+1; j < array.length-1; j++) {
		if (array[i]>=array[j]) {
		    int tmp = array[j];
		    array[j] = array[i];
		    array[i] = tmp;
		}
		
	    }
	}
	return array;
    }
    
    private static void printArray(int[] array) {
	for (int i : array) {
	    System.out.print(i);
	}
	System.out.print("\n");
    }
    
}
